<template>
    <div class="index">
        <index-top></index-top>
        <index-main></index-main>
    </div>
</template>

<script>
    import Top from "./Top";
    import Main from "./Main";

    export default {
        name: "index",
        components: {
            'index-top': Top,
            'index-main': Main
        },
        created() {
            let managerName=this.$cookie.get('managerName');
            if(managerName==null){
                this.$message({
                    type:"error",
                    message: '请先登录'
                });
                this.$router.push({
                    path: '/'
                })
            }
        }
    }
</script>

<style scoped>
.index{
    margin: 0;
    padding: 0;
    /*display: flex;*/
    flex-direction: column;
}
</style>
